import $ from 'jquery'
export default function getTableHeight(){
    var fullHeight=$('.el-container').outerHeight(true);
    var elhead=$('.el-header').outerHeight(true);
    var tabheadtop=0;
    if($('.el-tabs__header')>0){
        tabheadtop=$('.el-tabs__header').outerHeight(true);
    }
    var tbhead=0;
    if($('.tbheader').length>0){
      tbhead=$('.tbheader').outerHeight(true);
    }
    var mt=0;
    if($('.mt10').length>0){
      mt=parseInt($('.mt10').css('margin-top').replace('px', ''));
    }

    var elmainPaddingTop=parseInt($('.el-main').css('padding-top').replace('px', ''));
    var elmainPaddingBottom=parseInt($('.el-main').css('padding-top').replace('px', ''));
    var breadHeight=0;
    if($('.el-breadcrumb').length>0){
      breadHeight=$('.el-breadcrumb').outerHeight(true);
    }
    var pageheight=0;
    if($('.el-pagination').length>0){
      pageheight=$('.el-pagination').outerHeight(true);
    }
    var cdbodyPaddingTop=parseInt($('.el-card__body').css('padding-top').replace('px', ''));
    var cdbodyPaddingBottom=parseInt($('.el-card__body').css('padding-bottom').replace('px', ''));
    var tbheight=fullHeight-elhead-tbhead-tabheadtop-elmainPaddingTop-elmainPaddingBottom-breadHeight-pageheight-cdbodyPaddingTop-cdbodyPaddingBottom-mt*2;
    var tableHeight=tbheight-20;
    return tableHeight;
  }